home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-in_the_mag-
/
reader_requests
/
scilab
/
tests
/
elemlib.dia.ref
< prev
next >
Wrap
Text File
|
1999-09-16
|
1KB
|
50 lines
t=toeplitz(1:5,1:2:7);t1=[1 3 5 7;2 1 3 5;3 2 1 3;4 3 2 1;5 4 3 2];
if norm(t-t1)>10*%eps then bugmes();quit;end
t=toeplitz(1:5);t1=[1 2 3 4 5;2 1 2 3 4;3 2 1 2 3;4 3 2 1 2;5 4 3 2 1];
if norm(t-t1)>10*%eps then bugmes();quit;end
if toeplitz([])<>[] then bugmes();quit;end
s=poly(0,'s');
t=toeplitz([s s+1 s**2 1-s]);
t1=[s 1+s s*s 1-s;1+s s 1+s s*s;s*s 1+s s 1+s;1-s s*s 1+s s]
t1 =
! 2 !
! s 1 + s s 1 - s !
! !
! 2 !
! 1 + s s 1 + s s !
! !
! 2 !
! s 1 + s s 1 + s !
! !
! 2 !
! 1 - s s 1 + s s !
if norm(coeff(t-t1))>10*%eps then bugmes();quit;end
t=toeplitz(['1','2','3','4']);
t1=['1','2','3','4';'2','1','2','3';'3','2','1','2';'4','3','2','1']
t1 =
!1 2 3 4 !
! !
!2 1 2 3 !
! !
!3 2 1 2 !
! !
!4 3 2 1 !
if t<>t1 then bugmes();quit;end